function dataBaseOperator() { };

dataBaseOperator.openDatabase = function () {
    return window.openDatabase("dataBaseUserStories", "1.0", "dataBase used for user stories", 2 * 1024 * 1024);
}
dataBaseOperator.executeNonQuery = function (sql, parameters, callback, onerror) {
    var db = this.openDatabase();
    db.transaction(function (trans) {
        trans.executeSql(sql, parameters, function (trans, result) {
            if (callback)
                callback(result);
        }, function (trans, error) {
            if (onerror)
                onerror(error)
            else
                throw error.message;
        });
    });
}
dataBaseOperator.executeReader = dataBaseOperator.executeNonQuery;
dataBaseOperator.executeScalar = dataBaseOperator.executeNonQuery;